﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Restaurant.Client.Controls
{
    /// <summary>
    /// BusinessItem.xaml 的交互逻辑
    /// </summary>
    public partial class u_BusinessItem : UserControl
    {

        /// <summary>
        /// 本单详细信息 (随后改为实体类)
        /// </summary>
        public string Item { get; set; }


        public delegate void ThisClick(u_BusinessItem sender);
        /// <summary>
        /// 结算
        /// </summary>
        public event ThisClick Check;
        public u_BusinessItem()
        {
            InitializeComponent();
            Random rd = new Random();
            tb_Number.Text = rd.Next().ToString() + "号桌";
            tb_Sum.Text = rd.Next().ToString();

            Item = tb_Number.Text;
        }

        private void btn_Check_Click(object sender, RoutedEventArgs e)
        {
            Check?.Invoke(this);

        }
    }
}
